home *** CD-ROM | disk | FTP | other *** search
- /*
-
- Version 1.2
- Copyright (c) 1995 by Sean Luke
- Donated to the MiscKit
-
- Permission to use, copy, modify, and distribute this material
- for any purpose and without fee, under the restrictions as noted
- in the MiscKit copyright notice, is hereby granted, provided that
- the MiscKit copyright notice and this permission notice
- appear in all source copies, and that the author's name shall not
- be used in advertising or publicity pertaining to this
- material without the specific, prior written permission
- of the author. SEAN O. LUKE MAKES NO REPRESENTATIONS ABOUT THE
- ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE.
- IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
-
- */
-
- #import "MiscVolumeMeterInspector.h"
- #import "MiscSoundUtil.subproj/MiscVolumeMeter.h"
-
- @implementation MiscVolumeMeterInspector
-
- - init
- {
- char buf[MAXPATHLEN+1];
- id bundle;
-
- [super init];
- bundle=[NXBundle bundleForClass:[MiscVolumeMeter class]];
- [bundle getPath:buf forResource:"MiscVolumeMeterInspector" ofType:"nib"];
- [NXApp loadNibFile:buf owner:self withNames:NO fromZone:[self zone]];
- return self;
- }
-
-
- - ok:sender
- {
- float r=[refresh floatValue];
- if (r<=0){r=VOLUMEMETER_TIMED_ENTRY_SPEED;[refresh setFloatValue:r];}
-
- if ([display selectedRow]) [object setMono:self];
- else [object setStereo:self];
-
- if (![track selectedRow]) [object setToInput:self];
- else [object setToOutput:self];
-
- [object setRefresh:r];
- return [super ok:sender];
- }
-
- - revert:sender
- {
- [display selectCellAt:[object isStereo:self]:0];
- [refresh setFloatValue:[object refresh:self]];
- [track selectCellAt:![object isInput:self]:0];
-
- return [super revert:sender];
- }
-
- - (BOOL) wantsButtons
- {
- return NO;
- }
-
- @end
-